<script setup lang="ts">
import { defineComponent } from "vue";
import { useRouter } from "vue-router";

defineComponent({
  name: "Page401",
});

const router = useRouter();

const goHome = () => {
  router.push("/dashboard");
};
</script>

<template>
  <div class="errPage-container">
    <div class="error-content">
      <h1 class="error-code">401</h1>
      <div class="error-message">抱歉，您没有访问权限</div>
      <div class="error-desc">请确认您是否具有访问该页面的权限</div>
      <el-button type="primary" class="back-home" @click="goHome">返回首页</el-button>
    </div>
  </div>
</template>

<style lang="scss" scoped>
.errPage-container {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-color: var(--el-bg-color);

  .error-content {
    text-align: center;
    padding: 40px;
  }

  .error-code {
    font-size: 160px;
    font-weight: bold;
    color: var(--el-color-primary);
    margin: 0;
    line-height: 1;
    text-shadow: 4px 4px 0 var(--el-color-primary-light-8);
  }

  .error-message {
    font-size: 24px;
    color: var(--el-text-color-primary);
    margin: 24px 0 12px;
  }

  .error-desc {
    font-size: 16px;
    color: var(--el-text-color-secondary);
    margin-bottom: 32px;
  }

  .back-home {
    font-size: 16px;
  }
}
</style>
